<template>
  <div class="page">
    <div class="title">客户移交</div>
    <div class="stepContent">
      <VxStep :stepList="stepList" :current="current" />
    </div>
    <div class="content">
      <div class="name">已选客户</div>
      <div class="table">
        <vx-table :tableData="tableData" :columns="columns" :buttomGroup="buttomGroup" @delete="deleteCustom"> </vx-table>
        <div class="transferNumber">移交客户总数：{{ tableData.length }}个</div>
      </div>
      <div class="submit-info">
        <div class="name">提交信息</div>
        <div class="infoContent">
          <div class="info-item">
            <div class="info-item-label">移交客户经理编号</div>
            <div class="info-item-value">{{ transferCustomInfo.id }}</div>
          </div>
          <div class="info-item">
            <div class="info-item-label">移交客户经理名称</div>
            <div class="info-item-value">{{ transferCustomInfo.name }}</div>
          </div>
          <div class="info-item">
            <div class="info-item-label">移交原因</div>
            <div class="info-item-value">{{ transferCustomInfo.reason }}</div>
          </div>
        </div>
      </div>
      <div class="footer">
        <div class="buttonBox">
          <ui-button class="default-btn" @click="back">返回</ui-button>
          <ui-button class="primary-btn" @click="submit">提交</ui-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import VxStep from '@/components/vx-step';
import vxTable from '@/components/vx-table';
export default {
  name: '',
  components: {
    VxStep,
    vxTable,
  },
  data() {
    return {
      stepList: ['客户移交录入', '客户移交确认', '客户移交结果'],
      current: 1,
      tableData: [
        { test: '1111', customName: '1111111111' },
        { test: '1111', customName: '1111111111' },
        { test: '1111', customName: '1111111111' },
      ],
      columns: [
        {
          label: '客户名称',
          prop: 'customName',
        },
        {
          label: '客户类型',
          prop: 'customType',
        },
        {
          label: '联系电话',
          prop: 'phone',
        },
        {
          label: '证件类型',
          prop: 'documentType',
        },
        {
          label: '证件号码',
          prop: 'documentNumber',
        },
        {
          label: '管护机构',
          prop: 'householdManagementInstitution',
        },
        {
          label: '管理类型',
          prop: 'manageType',
        },
        {
          label: '金融资产',
          prop: 'financialAssets',
        },
        {
          label: '客户等级',
          prop: 'financialAssets',
          formatter: (row, column, cellValue, index) => {
            return row.customLevel;
          },
        },
        {
          label: '亲缘关系',
          prop: 'setRelation',
        },
      ],
      transferCustomInfo: {},
      buttomGroup: [{ label: '删除', methodsName: 'delete' }], // 操作按钮
    };
  },
  mounted() {
    this.transferCustomInfo = this.$route.query.formData;
  },
  methods: {
    back() {
      this.$router.back();
    },
    submit() {
      this.$router.push('/customManager/myCustom/customTransfer/customTransferSuc');
    },
    deleteCustom(row) {
      console.log(row);
    },
  },
};
</script>

<style lang="scss" scoped>
.page {
  .title {
    font-size: 18px;
    color: #000;
    font-weight: bold;
  }
  .stepContent {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
  }
  .content {
    padding: 16px;
    margin-top: 28px;
    background: #fff;
    .name {
      font-size: 14px;
      color: #262626;
      font-weight: bold;
    }
    .table {
      margin-top: 16px;
      .delete {
        background: #ffeae5;
        border: 1px solid #ffaba6;
        color: #f35052;
      }
      .transferNumber {
        margin-top: 16px;
        font-size: 14px;
        color: #262626;
        font-weight: bold;
        text-align: right;
      }
    }
    .submit-info {
      margin-top: 20px;
      .infoContent {
        display: flex;
        align-items: center;
        margin-top: 16px;
        .info-item {
          display: flex;
          align-items: center;
          width: 33%;
          border: 1px solid #f0f0f0;
          color: #262626;

          .info-item-label {
            width: 40%;
            background: #f8f8f8;
            padding: 10px 16px;
          }
          .info-item-value {
            width: 60%;
            padding: 10px 16px;
          }
        }
      }
    }
    .footer {
      background: #fff;
      padding: 20px;

      .buttonBox {
        border-top: 1px solid #ccc;
        padding: 20px 10px 0 10px;
        margin: auto;
        display: flex;
        align-items: center;
        justify-content: center;
      }
    }
  }
}
</style>